package com.intech.android.demo.cms.bo;


import java.util.Set;

public class Group
{
    private Integer id;
    private String age;
    private String arpu;
    private String sex;
    private Set<AudioContent> audioContents;
    private Set<GraphicContent> graphicContents;
    private Set<VideoContent> videoContents;
    private Set<TextContent> textContents;

    public Group()
    {
    }

    private void parseName(String name)
    {
        sex = "" + name.charAt(0);
        if (name.length() < 7)
        {
            age = "45";
            arpu = name.substring(3);
        }
        else
        {
            age = name.substring(1, 5);
            arpu = name.substring(5);
        }

    }

    public Group(String name)
    {
        parseName(name);
    }

    public Set<TextContent> getTextContents()
    {
        return textContents;
    }

    public void setTextContents(Set<TextContent> textContents)
    {
        this.textContents = textContents;
    }

    public Set<VideoContent> getVideoContents()
    {

        return videoContents;
    }

    public void setVideoContents(Set<VideoContent> videoContents)
    {
        this.videoContents = videoContents;
    }

    public Set<GraphicContent> getGraphicContents()
    {
        return graphicContents;
    }

    public void setGraphicContents(Set<GraphicContent> graphicContents)
    {
        this.graphicContents = graphicContents;
    }

    public Set<AudioContent> getAudioContents()
    {
        return audioContents;
    }

    public void setAudioContents(Set<AudioContent> audioContents)
    {
        this.audioContents = audioContents;
    }

    public String getName()
    {
        return sex + age + arpu;
    }

    public void setName(String name)
    {
        parseName(name);
    }

    public Integer getId()
    {
        return id;
    }

    public void setId(Integer id)
    {
        this.id = id;
    }

    public String getAge()
    {
        return age;
    }

    public String getARPU()
    {
        return arpu;
    }

    public void setARPU(String arpu)
    {
        this.arpu = arpu;
    }

    public String getSex()
    {
        return sex;
    }

    public void setSex(String sex)
    {
        this.sex = sex;
    }
}
